<?php include("include.php");?>
<?php 
	$jid =$_GET['jid'];
	$job = job::getJobById($jid);
	if(isset($job)){
?>
<div class="form">
<form action="editJobAction.php" method="post" id="editJobForm">
<h3>Job Information</h3>
<input type="hidden" name="jobid" value="<?php echo $job->getId();?>" />
<table>
	<tr>
		<td>Owner</td>
		<td><?php echo $job->getUser()->getName();?>
        	<input type="hidden" name="userid" value="<?php echo $job->getUser()->getId();?>" /></td>
	</tr>
	<tr>
		<td>Project</td>
		<td><?php echo $job->getProject()->getTitle();?>
        	<input type="hidden" name="projectid" value="<?php echo  $job->getProject()->getId();?>" /></td>
	</tr>    
	<tr>
		<td>Title</td>
		<td><input type="text" maxlength="255" name="title" value="<?php echo $job->getTitle();?>"/></td>
	</tr>
	<tr>
		<td>Question</td>
		<td><textarea cols="50" rows="5" name="description"><?php echo $job->getDescription();?></textarea></td>
	</tr>
	<tr>
		<td>Country</td>
		<td><?php echo country::generateSelectionBox($job->getCountry()->getId());?></td>
	</tr>
    <tr>
		<td class="label">&nbsp;</td>
		<td class="input"><img onclick="javascript:document.getElementById('editJobForm').submit();" src="images/save.png" /></td>
    </tr>    
</table> 
</form>
<?php }else{ 
	echo "<meta http-equiv=\"REFRESH\" content=\"0;url=dashboard.php\">";
}
?>
</div>
<?php include("includes/footer.php");?>